package com.hsgene.product.persistence;


import com.hsgene.product.domain.GeneticTestingProductDetail;
import com.hsgene.product.dto.peanut.GeneticTestingProductDetailDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface GeneticTestingProductDetailRepository {
    int deleteByPrimaryKey(String id);

    int insert(GeneticTestingProductDetail record);

    int insertSelective(GeneticTestingProductDetail record);

    GeneticTestingProductDetail selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(GeneticTestingProductDetail record);

    int updateByPrimaryKey(GeneticTestingProductDetail record);

    int insertMore(List<GeneticTestingProductDetail> testingProductDetailList);


    void deleteByProductId(String id);

    List<GeneticTestingProductDetail> getByProductId(String id);

    void deleteMore(List<String> list);

    void deleteProductByProductId(String id);

    /**
     * 套餐检测信息
     * @param packageId
     * @return
     */
    GeneticTestingProductDetailDto packageTestingInfo(@Param("packageId") String packageId, @Param("agencyId") String agencyId);

    /**
     * 根据样本id查询在d套餐etail表的数量
     * @param samplyId
     * @return
     */
    int getCountBySamplyId(String samplyId);
}